<link href="__CDN__/assets/addons/yunfood/css/admin.css?t={$time}" rel="stylesheet">
<div class="workbench">
    <div class="btn-refresh hidden" id="resetecharts"></div>
    <div class="stores">
        <div class="select-shop">
            <div class="b-tit">选择门店:</div>
            <div class="b-cont">{:build_select('shop_id', $shopList, null, ['class'=>'form-control selectpicker', 'id'=>'c-shop_id'])}</div>
        </div>
        <div class="voice-notice f-close{$voiceNotice ? '': ' hide'}" data-state="0">
            <div class="b-tit">订单提醒开启中</div>
            <div class="fa fa-bell btn-dialog"></div>
        </div>
        <div class="voice-notice f-open{$voiceNotice ? ' hide': ''}" data-state="1">
            <div class="b-tit">订单提醒关闭中</div>
            <div class="fa fa-bell-slash btn-dialog"></div>
        </div>
    </div>
    <audio id="bgMusic" controls src="" style="display:none;"></audio>
    <div id="app" v-cloak>
        <div class="page-header">
            <div class="b-title">最近下单数据</div>
            <div class="b-note">展示最近的8个订单</div>
        </div>
        <div class="row" v-if="hasLoad.recent">
            <div class="col-xs-12 col-sm-3" v-for="(item, index) in recentList" :key="index" v-if="recentList.length > 0">
                <div class="panel panel-default order-info" :class="'f-'+item.state">
                    <div class="b-head">
                        <div class="s-order-no">订单: {{item.order_no}}</div>
                    </div>
                    <div class="b-main">
                        <div class="s-method">{{item.enjoy_type_text}}</div>
                        <div class="s-info" v-if="item.enjoy_type == 'meat'">桌位号：{{item.desk_number}}</div>
                        <div class="s-info" v-if="item.enjoy_type == 'pack'">预留电话：{{item.contact}}</div>
                        <div class="s-name" v-if="item.goods_list.length == 1">{{item.goods_list[0].goods_name}} x {{item.goods_list[0].goods_count}}份 {{item.goods_list[0].goods_names}}</div>
                        <div class="s-name" v-else>多份订单，请查看详情</div>
                        <div class="s-note">{{item.note}}</div>
                        <div class="b-more">
                            <div class="fa fa-external-link btn-dialog" :href="'yunfood/order/main/edit/ids/'+item.id"
                                 data-area="[&quot;90%&quot;,&quot;90%&quot;]" title="订单详情"></div>
                        </div>
                    </div>
                    <div class="b-info" data-toggle="tooltip" data-placement="bottom" data-trigger="hover" title="">
                        <div class="s-last">支付时间: {{item.payment_time_text}}</div>
                    </div>
                </div>
            </div>
            <div class="empty" v-if="recentList.length === 0">暂无数据</div>
        </div>
        <div class="loading" v-else>加载中</div>
        <div class="page-header">
            <div class="b-title">全部桌号数据</div>
            <div class="b-note">两小时的下单算就餐中</div>
        </div>
        <div class="row">
            <input type="hidden" id="c-group" value="all">
            <div class="filter-box">
                <div class="b-item f-active" data-value="all">全部</div>
                <div class="b-item" data-value="empty">空闲中</div>
                <div class="b-item" data-value="ing">就餐中</div>
            </div>
        </div>
        <div class="row" style="margin-top:20px;" v-if="hasLoad.allDesk">
            <div class="col-xs-6 col-sm-2" v-for="(item, index) in deskList" :key="index" v-if="deskList.length > 0">
                <div class="panel panel-default desk-info" :class="'f-'+item.state">
                    <div class="b-main">
                        <div class="s-name">{{item.number}}</div>
                        <div class="s-state">{{item.state_text}}</div>
                    </div>
                    <div class="b-info" data-toggle="tooltip" data-placement="bottom" data-trigger="hover" title="">
                        <div class="s-last">{{item.last_order_time_text}}</div>
                    </div>
                    <div class="b-more">
                        <div class="fa fa-list-alt btn-dialog" :href="'yunfood/order/main/index?desk_id='+item.id"
                             data-area="[&quot;90%&quot;,&quot;90%&quot;]" :title="item.number+'的订单'"></div>
                    </div>
                </div>
            </div>
            <div class="empty" v-if="deskList.length === 0">暂无数据</div>
        </div>
        <div class="loading" v-else>加载中</div>
    </div>
</div>

<style>
    [v-cloak] {
        display: none !important;
    }
</style>